package com.qdrtme.landemo.newcms;

import android.content.Context;

import com.qdrtme.landemo.BaseApi;

import org.json.JSONException;

import java.util.HashMap;

/**
 * @Created by taylor on 12/16/17.
 * @class
 */

public class AddContestanApi extends BaseApi {

    private String voteActivityId;
    private String type;
    private String realName;
    private String content;
    private String phoneNumber;

    public AddContestanApi(Context c) {
        super(c);
    }

    @Override
    protected String getURL() {
        return BaseApi.ADD_CONTESTAN;
    } //+ "/" + voteActivityId

    @Override
    protected void getParams(HashMap<String, Object> params) {
        super.getParams(params);
        params.put("voteActivityId", voteActivityId);
        params.put("type", type);
        params.put("realName", realName);
        params.put("content", content);
        params.put("phoneNumber", phoneNumber);
    }

    @Override
    protected boolean analysisOutput(String result) throws JSONException {
        return true;
    }

    public void setVoteActivityId(String voteActivityId) {
        this.voteActivityId = voteActivityId;
    }

    public void setType(String type) {
        this.type = type;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }
}
